<!DOCTYPE html>
<html>

<head>
  <title>横向无缝滚动</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>

<body>
  <div>站内公告</div>
  <hr />
  <div id="demo" style="overflow: hidden; width: 860px; align: center">
    <table cellspacing="0" cellpadding="0" align="center" border="0">
      <tbody>
        <tr>
          <td id="marquePic1" valign="top">
            <table width="1800px">
              <tr>
                <td>第1个单元格</td>
                <td>第2个单元格</td>
                <td>第3个单元格</td>
                <td>第4个单元格</td>
                <td>第5个单元格</td>
                <td>第6个单元格</td>
                <td>第7个单元格</td>
                <td>第8个单元格</td>
                <td>第9个单元格</td>
                <td>第10个单元格</td>
              </tr>
            </table>
          </td>
          <td id="marquePic2" valign="top">
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</body>

</html>
<script type="text/javascript">
  //横向滚动 需要设置div的宽度
  var speed = 10
  marquePic2.innerHTML = marquePic1.innerHTML

  function Marquee() {
    if (demo.scrollLeft >= marquePic1.scrollWidth) {
      demo.scrollLeft = 0
    } else {
      demo.scrollLeft++
    }
  }
  var MyMar = setInterval(Marquee, speed)
  demo.onmouseover = function () {
    clearInterval(MyMar)
  }
  demo.onmouseout = function () {
    MyMar = setInterval(Marquee, speed)
  }
</script>